package com.njlime.core.base.repository;

import java.util.List;
import java.util.Map;

/**
 * Dao基类
 * Created by Dean on 2017-7-18.
 */
public interface BaseDao<T> {

    //EntityManager
    List<T> findList(String sql, List<Object> args);
    T findOne(String sql, List<Object> args);
    Object findCount(String sql, List<Object> args);
    int getListJdbcSize(String sql, List<Object> args);
    int updateJdbc(String sql, List<Object> arrList);
    List<Map<String, Object>> getListJdbc(String sql, List<Object> args);

    //数据范围
    void dataScopeFilter(Integer userId, StringBuilder sb, List<Object> arrList, String unitAlias, String selfAlias);

}
